<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <?php
    
    $a=$_GET['id'];
    $mysqli = new mysqli("127.0.0.1", "root", "970518", "stuinfo");

    $sql="select * from mytable where id='$a'";
    $result=mysqli_fetch_array($mysqli->query($sql));
    
    ?>
    <body>
        <form method='post' action='updated.php'> 
            <input name="id" type="hidden" value='<?php echo $result['id'];?>' />
        <table width=90% align=center> 
        <tr>
        <td>输入您要修改的姓名：</td>
       <td>
             <input type='text' name='name' size=40 maxlength=10 value="<?php echo $result['name'] ?>">
         </td>
         
        </tr> 　　
        <tr>
        <td>输入您要修改的年纪:</td>
          <td>
             <input type='text' name='grade' size=40 maxlength=10 value="<?php echo $result['grade'] ?>">
         </td>
        </tr> 
        <tr>
        <td>输入您要修改的班级:</td>
            <td>
             <input type='text' name='classnum' size=40 maxlength=10 value="<?php echo $result['classnum'] ?>">
            </td>
        </tr> 　　
        <tr>
        <td></td>
            <td>
             <input type='submit' value='修改'>
            </td>
        </tr> 
        </form> 
        <br>
            <?php include('links.txt')?>
    </body>
</html>
